<template>
    <div class="goods-list-item"
         @click="handleItemClick">
        <slot name="item-pic">
        </slot>
        <slot name="item-info">
        </slot>
    </div>
</template>
<script>
export default {
    name: "GoodsListItem",
    props: {
        goodItem: {
            type: Object,
            default () {
                return {}
            }
        }
    },
    methods: {
        handleItemClick: function () {
            this.$router.push('/detail/' + this.goodItem.iid)
        }
    }
}
</script>
<style scoped>
.goods-list-item {
    margin-bottom: 10px;
    position: relative;
    width: 45%;
}
</style>